package Basic.day03;

public class OperDemo01 {
    public static void main(String[] args) {
        // 1. 算术运算符
        System.out.println(10 / 3); // 3
        System.out.println(10.0 / 3); // 3.3333333333333335
        System.out.println(10 % 3); // 1
        System.out.println(10.0 % 3); // 1.0

        //++
        //被使用
        int a = 5, b = 5;
        int c = a++;
        int d = a;
        int e = ++b;
        int f = b;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);

        //单独用
        int g = 10;
        int h = 10;
        g++;
        System.out.println(g);
        ++h;
        System.out.println(h);
        System.out.println(h++);
        System.out.println(++h);


    }
}
